#ifndef MCU_H
#define MCU_H

#include "Mcu_Cfg.h"


typedef struct //TODO
{
    int a;
}Mcu_ConfigType;

typedef uint32  Mcu_ClockType;

typedef struct //TODO
{
    int a;
}Mcu_ModeType;

typedef enum
{
    MCU_PLL_LOCKED = 0x33U,   			/**< @brief PLL is locked. */
    MCU_PLL_UNLOCKED = 0xCCU,   		/**< @brief PLL is unlocked. */
    MCU_PLL_STATUS_UNDEFINED = 0x5AU   	/**< @brief PLL Status is unknown. */

} Mcu_PllStatusType;

typedef enum
{
    MCU_STOP_ACKNOWLEDGE_ERROR_RESET = 0u,        /**< @brief Stop Acknowledge Error reset . RCM_SRS[SACKERR]. */
    MCU_MDM_AP_SYSTEM_RESET = 1u,                 /**< @brief MDM-AP System Reset Request . RCM_SRS[MDM_AP]. */
    MCU_SW_RESET = 2u,                            /**< @brief Software reset . RCM_SRS[SW]. */
    MCU_CORE_LOCKUP_RESET = 3u,                   /**< @brief Core Lockup reset . RCM_SRS[LOCKUP]. */
    MCU_JTAG_RESET = 4u,                          /**< @brief JTAG generated reset . RCM_SRS[JTAG]. */
    MCU_POWER_ON_RESET = 5u,                      /**< @brief Power-on reset. RCM_SRS[POR]. */
    MCU_EXTERNAL_PIN_RESET = 6u,                  /**< @brief External Reset Pin. RCM_SRS[PIN]. */
    MCU_WATCHDOG_RESET = 7u,                      /**< @brief Watchdog reset. RCM_SRS[Watchdog]. */
    MCU_CMU_LOSS_OF_CLOCK_RESET = 8u,             /**< @brief CMU Loss-of-Clock Reset. RCM_SRS[CMU_LOC]. */
    MCU_LOSS_OF_LOCK_RESET = 9u,                  /**< @brief Loss-of-Lock Reset. RCM_SRS[LOL]. */
    MCU_LOSS_OF_CLOCK_RESET = 10u,                /**< @brief Loss-of-Clock Reset. RCM_SRS[LOC]. */
    MCU_LOW_OR_HIGH_VOLTAGE_DETECT_RESET = 11u,   /**< @brief Low-Voltage Detect Reset or High-Voltage Detect Reset. RCM_SRS[LVD]. */
    MCU_NO_RESET_REASON = 12u,                    /**< @brief No reset reason found */
    MCU_MULTIPLE_RESET_REASON = 13u,              /**< @brief More than one reset events are logged except "Power on event" */
    MCU_RESET_UNDEFINED = 14u                     /**< @brief Undefined reset source. */

} Mcu_ResetType;

Std_ReturnType Mcu_Init(Mcu_ConfigType *pConfigPtr);
Std_ReturnType Mcu_InitClock(Mcu_ClockType ClockSetting);
void Mcu_SetMode(Mcu_ModeType McuMode);
Std_ReturnType Mcu_DistributePllClock(void);
Mcu_PllStatusType Mcu_GetPllStatus(void);
Mcu_ResetType Mcu_GetResetReason(void);
void Mcu_PerformReset(void);

#endif
